#define  _CRT_SECURE_NO_WARNINGS 1

//https://www.nowcoder.com/practice/7a0da8fc483247ff8800059e12d7caf1?tpId=13&tqId=11200&tPage=3&rp=3&ru=/ta/coding-interviews&qru=/ta/coding-interviews/question-ranking

class sum {
public:
    sum()
    {
        _sum += _i;
        _i++;

    }

    static int getSum()
    {
        return _sum;
    }

private:
    static int _i;
    static int _sum;
};

int sum::_i = 1;
int sum::_sum = 0;



//class Solution {
//public:
//    int Sum_Solution(int n) {
//        sum arr[n];
//
//        return sum::getSum();
//    }
//};




